﻿<%@ Page Language="C#" AutoEventWireup="true" EnableEventValidation="false" MasterPageFile="~/MasterPage.master"
    Inherits="System_User_List" CodeFile="User_List.aspx.cs" %>

 <%@ Register Src="~/UserControl/GridPager.ascx" TagName="GridPager"  TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <title>移动端用户列表</title>
 
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div>
        <div>
            <table id="wsd_inputtable">
                <tr>
                    <td class="tabletitle" colspan="6">
                        查询条件
                    </td>
                </tr>
                <tr>
                   <td class="tablefield">
                        用户帐号:
                    </td>
                    <td>
                        <asp:TextBox runat="server" ID="txtLoginName" class="default"></asp:TextBox>
                    </td>
                    <td class="tablefield">
                        用户姓名:
                    </td>
                    <td  >
                        <asp:TextBox runat="server" ID="txtName" class="default"></asp:TextBox>
                    </td>
                    <td class="tablefield">
                        用户职位:</td>
                    <td>
                        <asp:DropDownList ID="ddlPosition" Width="150" runat="server">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
       <td class="tablefield"> 
                        角色:
                    </td>
                    <td>
                        <asp:DropDownList runat="server" ID="ddlGroup" Width="150">
                        </asp:DropDownList>
                    </td>
                    <td class="tablefield">
                        组织架构:
                    </td>
                    <td>
                        <asp:TextBox ID="txtOrg" runat="server" class="default" onkeydown="alert('请选择组织架构');return false;"></asp:TextBox>
                        <input id="txtHidOrg" type="hidden" runat="server" />
                        <img src="../Resources/Images/search.png" alt="查找" style="cursor: pointer;" onclick="openPopup('../System/PopupOrganization.aspx?NameControlId=<%# txtOrg.UniqueID %>&ValueControlId=<%# txtHidOrg.UniqueID %>&SelectType=multi','','300','500');" />
                        <br />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="请选择组织架构!"
                            ControlToValidate="txtOrg"></asp:RequiredFieldValidator>
                    </td>
                    <td  class="tablefield">
                    用户类型:
                       </td>
                       <td>
                        <asp:DropDownList ID="ddlKind" runat="server" Width="150" >
                         <asp:ListItem Value="">--所有--</asp:ListItem>
                        <asp:ListItem Value="0">后台用户</asp:ListItem>
                        <asp:ListItem Value="1">手机用户</asp:ListItem>
                    </asp:DropDownList>
                       </td>
                </tr>
                <tr><td colspan="6"  class="buttonarea">
                 <asp:Button ID="btnQuery" runat="server" Text="查  询" CssClass="wsd_button2" OnClick="btnQuery_Click" />
                        &nbsp;<asp:Button ID="btnExport" runat="server" class="wsd_button2" Text="导出Excel"
                        OnClick="btnExport_Click" />
                        &nbsp;
                        <input type="button" class="wsd_button2" size="47" value="重  置" name="reset" onclick="clearForm('form1')" />
                    
                </td></tr>
            </table>
            <br />
            <table id="wsd_inputtable">
                <tr>
                    <td class="tabletitle">
                        用户列表
                    </td>
                    <td class="tabletitle">
 
                    </td>
                </tr>
            </table>
             <asp:UpdatePanel runat="server" ID="UpdatePanel1" UpdateMode="Conditional">
        <ContentTemplate>
            <table id="wsd_listtable">
                <tr>
                    <td style="width: 100%">
                        <asp:GridView   BorderWidth="0"  Width="100%" ID="GridView1" runat="server" AutoGenerateColumns="False"
                            EmptyDataText="没有可显示的数据." EmptyDataRowStyle-Font-Bold="true" EmptyDataRowStyle-HorizontalAlign="Center"
                            EnableEmptyContentRender="true" DataKeyNames="ID" OnRowCommand="GridView1_RowCommand"
                            OnRowDataBound="GridView1_RowDataBound" AllowPaging="True" 
                            OnPageIndexChanging="GridView1_PageIndexChanging" >
                            <HeaderStyle CssClass="titlist"   />
                            <EmptyDataRowStyle HorizontalAlign="Center" Font-Bold="True"></EmptyDataRowStyle>
                            <Columns>
                                <asp:HyperLinkField DataNavigateUrlFormatString="Edit_User.aspx?id={0}" HeaderText="用户帐号"
                             ItemStyle-Width="15%"        DataNavigateUrlFields="ID" DataTextField="CODE" ControlStyle-Font-Underline="false">
                                    <ControlStyle Font-Underline="False"></ControlStyle>
                                <ItemStyle Width="15%" />
                                </asp:HyperLinkField>
                                <asp:BoundField HeaderText="用户名" DataField="NAME"   ItemStyle-Width="15%">
                                <ItemStyle Width="15%" />
                                </asp:BoundField>
                                <asp:BoundField HeaderText="性别" DataField="SEX"  ItemStyle-Width="6%" >
                                <ItemStyle Width="6%" />
                                </asp:BoundField>
                                <asp:BoundField HeaderText="用户角色" DataField="Group_Name"   
                                    ItemStyle-Width="10%">
                                <ItemStyle Width="10%" />
                                </asp:BoundField>
                                <asp:BoundField HeaderText="电话" DataField="TELEPHONE"  ItemStyle-Width="10%" >
                                <ItemStyle Width="10%" />
                                </asp:BoundField>
                                <asp:BoundField HeaderText="传真" DataField="FAX"  ItemStyle-Width="10%" >
                                <ItemStyle Width="10%" />
                                </asp:BoundField>
                                <asp:BoundField HeaderText="邮件地址" DataField="E_MAIL"  ItemStyle-Width="15%" >
                                <ItemStyle Width="15%" />
                                </asp:BoundField>
                                <asp:TemplateField HeaderText="有效" ItemStyle-HorizontalAlign="center" HeaderStyle-HorizontalAlign="center">
                                    <ItemTemplate>
                                        <b>
                                            <%# Eval("ACTIVE").ToString()=="True" ? "<font size='3' color='green'>√</font>" : "<font size='3' color='red'>×</font>"%></b>
                                    </ItemTemplate>
                                    <HeaderStyle HorizontalAlign="Center" />
                                    <ItemStyle HorizontalAlign="Center" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="重置密码"  ItemStyle-Width="10%">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="btnReset" CommandName="reset" runat="server"  CssClass="btn3_mouseover"
                                            Text="重置密码" CommandArgument='<%# Eval("ID") %>' />
                                    </ItemTemplate>
                                    <ItemStyle Width="10%" />
                                </asp:TemplateField>
                            </Columns>
                            <PagerSettings  Visible="false" FirstPageText="首页" LastPageText="尾页" Mode="NumericFirstLast" PageButtonCount="30" />
                            <RowStyle CssClass="evenline" HorizontalAlign="Center" />
                            <AlternatingRowStyle CssClass="oddline" />
                        </asp:GridView>
                        <uc1:GridPager ID="GridPager1" runat="server" Visible="false"  />
                    </td>
                </tr>
            </table>
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="btnQuery" EventName="Click" />
            </Triggers>
        </asp:UpdatePanel>
            <br />
            <table id="wsd_inputtable">
                <tr>
                    <td width="100%" class="tabletitle">
                        操作选项
                    </td>
                </tr>
                <tr>
                    <td class="buttonarea">
                        <input class="wsd_button2" id="Button15" onclick="window.location.href='Edit_User.aspx'"
                            value="新  增" name="Button2" type="button">
                    </td>
                </tr>
            </table>
        </div>
    </div>
</asp:Content>
